package net_rpc

import "net/rpc"

type tTimeClientV2 struct {
	client *rpc.Client
}

func newTimeClientV2(client *rpc.Client) ITimeClientV2 {
	return &tTimeClientV2{client}
}

func (me *tTimeClientV2) GetTime() (error, int64) {
	var t int64 = 0
	err := me.client.Call("TimeServer.GetTime", 1, &t)
	if err != nil {
		return err, 0
	}

	return nil, t
}
